<template>
	<view class="container">
		<view class="tui-order-header" v-if="expData">
			<view class="tui-text">订单编号：
				<text class="tui-bold">{{expData.number}}</text>
			</view>
			<view class="tui-text">{{expData.expName}}</view>
		</view>
		<view class="tui-order-tracking" v-if="expData">
			<tui-time-axis>
				<tui-timeaxis-item backgroundColor="transparent" v-for="(item,idx) in expData.list">
					<template v-slot:node>
						<view class="tui-node" v-if="!idx" :style="{backgroundColor:backgroundColor}">
							<tui-icon name="check" color="#fff" :size="14" :bold="true"></tui-icon>
						</view>
						<view class="tui-node" v-else>
							<tui-icon name="order" color="#fff" :size="12"></tui-icon>
						</view>
					</template>
					<template v-slot:content>
						<view>
							<view class="tui-order-desc">{{item.status}}</view>
							<view class="tui-order-time tui-gray">{{item.time}}</view>
						</view>
					</template>
				</tui-timeaxis-item>
			</tui-time-axis>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				osn:'',
				backgroundColor:"#EB0909",
			}
		},
		onLoad(options){
            this.osn=options.osn;
		},
		onShow(){
			this.getExpInfo();
		},
		
		methods:{
			getExpInfo(){
				this.tui.get('user/order/exp',{exp:this.exp}).then(res=>{
					this.expData= res.data;
				});
			}
		}
	}
</script>

<style>
	.tui-order-header {
		padding: 30rpx;
		box-sizing: border-box;
		background: #fff;
	}

	.tui-text {
		font-size: 28rpx;
		color: #333;
		padding: 4rpx;
	}

	.tui-bold {
		font-weight: bold;
	}

	.tui-node {
		height: 44rpx;
		width: 44rpx;
		border-radius: 50%;
		background-color: #ddd;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #fff;
		flex-shrink: 0;
	}

	.tui-node-dot {
		height: 16rpx;
		width: 16rpx;
		background-color: #ddd;
		border-radius: 50%;
		/* transform: translateY(45%); */
		margin-top: 6rpx;
	}

	.tui-bg-primary {
		background: #EB0909 !important;
	}

	.tui-order-tracking {
		padding: 30rpx 30rpx 30rpx 40rpx;
		background: #fff;
		margin-top: 20rpx;
		box-sizing: border-box;
	}

	.tui-order-title {
		padding-bottom: 12rpx;
		font-size: 32rpx;
		color: #333;
		font-weight: bold;
	}

	.tui-order-desc {
		padding-bottom: 12rpx;
		font-size: 28rpx;
		color: #333;
	}

	.tui-ptop {
		display: flex;
		justify-content: flex-start;
		line-height: 28rpx;
	}

	.tui-order-time {
		font-size: 24rpx;
		font-weight: bold;
	}

	.tui-gray {
		color: #848484 !important;
	}

	.tui-light-gray {
		color: #888 !important;
	}

	.tui-primary {
		color: #5677fc;
	}
</style>
